import React from 'react'
import { Button, Popover } from 'antd'
import { PlusOutlined, ReloadOutlined, DownloadOutlined } from '@ant-design/icons'
import TableSetting from './TableSetting'
import '../../containers/DepartmentManage/views/style.css'
import { ColumnsType } from 'antd/lib/table'


// tableName="组织管理表"  onDownload={onDownload}

interface ToolbarProps {
    tableName?: string,
    buttonText?: string | null | undefined,
    onDownload?: Function | any,
    downloading?:boolean
}
export default function TableToolbar(props: ToolbarProps) {
    return (
        <div className="ant-pro-table-toolbar">
            {
                props.onDownload ?
                    <div className="ant-pro-table-toolbar-title">
                        {props.tableName}
                    </div> : null
            }
            {
                props.onDownload ?
                    <div className="ant-pro-table-toolbar-option" style={{ marginRight: '8px' }}>
                        <Button type="primary" loading={props.downloading} icon={<DownloadOutlined />} onClick={props.onDownload}>导出清单</Button>
                    </div> : null
            }
        </div>
    )
}
